<!doctype html>
<script>

  if (window.testRunner)
    testRunner.dumpAsText();

  var count = 43;
  window.created = 0;

  function define(name, child) {
    customElements.define(name, class extends HTMLElement {
      constructor() {
        super();
        created++;
        if (created == count)
          document.body.appendChild(document.createTextNode("PASS."))
        document.createElement(child);
      }
    });
  }

  var prefix = 'x-';
  for (var i=0; i < count; i++) {
     define(prefix + i, prefix + (i+1));
  }
</script>
<p>
Tests that we can recurse up to 43 times between V8 and Blink.
You should see PASS below, and no stack size exceeded RangeError.
<x-0></x-0>
